<?php


namespace core\utils;


use core\service\MqClient;
use support\Container;

class MqUtil
{
    /**
     * 异步投递
     * @param $queue
     * @param $data
     * @param int $delay
     */
    static function asyncSend($queue, $data, $delay = 0)
    {
        Container::get(MqClient::class)->asyncSend($queue, $data, $delay);
    }

    /**
     * 同步投递
     * @param $queue
     * @param $data
     * @param int $delay
     */
    static function send($queue, $data, $delay = 0)
    {
        Container::get(MqClient::class)->send($queue, $data, $delay);
    }
}